use data/gsem_grm_prepost_1952.dta

*** Scree plot 

factor partyid_base attpresthermdiff attpartythermdiff partyaffect partyprespref partyvotehouse3 strongpartisan if post==0
factor partyid_base attpresthermdiff attpartythermdiff partyaffect partyprespref partyvotehouse3 strongpartisan if post==1

**** Table D.2 

** gen split ticket voting

tab VCF0709
gen splitticket = 0 if VCF0709>0 & VCF0709<=4
replace splitticket = 1 if VCF0709==2 
replace splitticket = 1 if VCF0709==3

tab VCF0305
gen pidstrength = VCF0305 if VCF0305!=0
gen straightticket = 1-splitticket

tab VCF0723
gen participation = VCF0723 if VCF0723>=1 & VCF0723<=6

gen absthermdiff = abs(thermdiff)

corr partystrength_free pidstrength straightticket participation thermdiff if post==0
corr partystrength_free pidstrength straightticket participation thermdiff if post==1
